package com.example.im.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import java.io.Serializable

@Entity(indices = [Index(value = ["name"], unique = true)])
class AccountInfo : Serializable {

    @PrimaryKey
    @ColumnInfo(name = "name")
    var name: String = "name"
    @ColumnInfo(name = "email")
    var email: String? = null
    @ColumnInfo(name = "username")
    var username: String? = null

    fun getAccount(): AccountInfo = this

    companion object {
        private const val serialVersionUID = 42L
    }
}
